package com.study.d1_properties;

import java.io.FileReader;
import java.io.FileWriter;
import java.util.Properties;

public class Test3 {
    public static void main(String[] args) throws Exception{
        Properties props = new Properties();
        props.load(new FileReader("day11/src/people.txt"));
        if(props.containsKey("小红")){
            props.setProperty("小红","18");
        }
        System.out.println(props);
        props.store(new FileWriter("day11/src/people.txt"),"updata xiao hong");
    }
}
